package com.sixth.volunteerservicesystem.Controller.ExamController.backExam;

import com.sixth.volunteerservicesystem.Dao.QuestionRepository;
import com.sixth.volunteerservicesystem.domain.Subjects;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author Steve Jobs
 * @create 2021-01-11 12:31
 */
@Controller
public class AddSubjectsBack {

    @Autowired
    QuestionRepository questionRepository;

    @PostMapping("/addSubjectsBack")
    public String addSubjectsBack(Subjects subjects){

        questionRepository.save(subjects);


        return "redirect:/backExamList";
    }


}
